package com.yjhb.android.sbz.tool;

import android.app.Activity;
import android.content.Context;

import androidx.fragment.app.Fragment;

import com.yjhb.android.sbz.R;
import com.jojo.android.zxlib.view.dialog.ILoading;
import com.jojo.android.zxlib.view.dialog.LoadingDialog;
import com.jojo.android.zxlib.view.spinkit.Style;


/**
 * 创建者 zx
 * 创建时间 2020/8/26 11:33
 */
public class LoadingDialogTool {

    public static ILoading createDialog(Context context) {
        LoadingDialog dialog = new LoadingDialog(context);
        dialog.setColor(context.getResources().getColor(R.color.colorPrimaryDark));
        dialog.setTipsColor(context.getResources().getColor(R.color.colorPrimaryDark));
//        dialog.setStyle(Style.FOLDING_CUBE);
        dialog.setCancelable(true);
        dialog.setStyle(Style.THREE_BOUNCE);
        return dialog;
    }

    public static ILoading createDialog(Activity context) {
//        MiniLoadingDialog dialog = new MiniLoadingDialog(context);
        return createDialog((Context) context);
    }

    public static ILoading createDialog(Fragment context) {
//        MiniLoadingDialog dialog = new MiniLoadingDialog(context);
        return createDialog(context.getContext());
    }

}
